import '../api/userApi'

import { Routers } from '../utils/decorator/apiDecorator'

import koaRouter from 'koa-router'
const router: any = new koaRouter()
/**
 * 组装router
 */
Routers.forEach((item) => {
    let prefix: string = item.prefix
    item.children.forEach(el => {
        router[el.method](prefix + el.path, el.handler)
    })
})
export default router

